using ObjFileLoader.Loaders;
using ObjFileLoader.TypeParsers.Interfaces;

namespace ObjFileLoader.TypeParsers
{
	public class MaterialLibraryParser : TypeParserBase, IMaterialLibraryParser, ITypeParser
	{
		private readonly IMaterialLibraryLoaderFacade _libraryLoaderFacade;

		protected override string Keyword => "mtllib";

		public MaterialLibraryParser(IMaterialLibraryLoaderFacade libraryLoaderFacade)
		{
			_libraryLoaderFacade = libraryLoaderFacade;
		}

		public override void Parse(string line)
		{
			_libraryLoaderFacade.Load(line);
		}
	}
}
